package hspedu.learn.javabase;

import lombok.*;

public class Encapsulation1 {
    public static void main(String[] args) {
        Person person = new Person();
        person.name = "java";
        person.setAge(10);
        person.setSalary(1100);
        System.out.println(person.info());
    }
}
@Data
class Person {
    public String name;
    private int age;
    private double salary;

    public String info() {
        return "name = " + name+" age= " +age+" salary= "+salary;
    }

}
